public class Main {
    public static void main(String[] args) {
        Faculty fac = new Faculty("张三",32,"33006","2019","10","25","讲师");
        Student stu=new Student("李四",19,"20201103","202011");
        Staff sta = new Staff("王五",27,"32011","2015","06","17","教务员");
        fac.show();
        sta.show();
        stu.show();
    }
}
class Role{
    protected String name;
    protected int age;
}
class Student extends Role{
    protected String id;
    protected String cls;

    public Student(String name, int i, String s, String s1) {
        super();
        this.name=name;
        this.age=i;
        this.id=s;
        this.cls=s1;
    }

    void show(){
        System.out.printf("我是%s，年龄%d岁。学号是%s，来自%s班。\n",this.name,this.age,this.id,this.cls);
    }
}
class Employee extends Role{
    protected String work_id;
    protected String year;
    protected String month;
    protected String day;

}
class Faculty extends Employee{
    protected String job;

    public Faculty(String name, int i, String s, String s1, String s2, String s3, String job) {
        super();
        this.name=name;
        this.age=i;
        this.work_id=s;
        this.year=s1;
        this.month=s2;
        this.day=s3;
        this.job=job;
    }
    void show(){
        System.out.printf("我是%s，年龄%d岁。工号是%s，%s年%s月%s日入职。是一名教师，%s职称。\n"
                ,this.name,this.age,this.work_id,this.year,this.month,this.day,this.job);
    }
}
class Staff extends Employee{
    protected String work;

    public Staff(String name, int i, String s, String s1, String s2, String s3, String work) {
        super();
        this.name=name;
        this.age=i;
        this.work_id=s;
        this.year=s1;
        this.month=s2;
        this.day=s3;
        this.work=work;
    }
    void show(){
        System.out.printf("我是%s，年龄%d岁。工号是%s，%s年%s月%s日入职。是一名%s。\n"
                ,this.name,this.age,this.work_id,this.year,Integer.parseInt(this.month),this.day,this.work);
    }
}